<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<SCRIPT language=JavaScript>
var message="";
function clickIE() {if (document.all) {(message);return false;}}
function clickNS(e) {if 
(document.layers||(document.getElementById&&!document.all)) {
if (e.which==2||e.which==3) {(message);return false;}}}
if (document.layers) 
{document.captureEvents(Event.MOUSEDOWN);document.onmousedown=clickNS;}
else{document.onmouseup=clickNS;document.oncontextmenu=clickIE;}

document.oncontextmenu=new Function("return false")
</SCRIPT>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>
<style type="text/css">
<!--
.camposs {	font-family: Verdana, Arial, Helvetica, sans-serif;
	font-size: 9px;
	background-color: #999999;
	border: 1px solid #666666;
}
body,td,th {
	font-family: Verdana, Arial, Helvetica, sans-serif;
	color: #000000;
	font-size: 12px;
}
body {
  scrollbar-arrow-color: #FF9900;
  scrollbar-3dlight-color: #FFFFFF;
  scrollbar-highlight-color: #000000;
  scrollbar-face-color: #FFFFFF;
  scrollbar-shadow-color: #000000;
  scrollbar-darkshadow-color: #FFFFFF;
  scrollbar-track-color: #FFFFFF;
	margin-left: 5px;
	margin-top: 5px;
	margin-right: 0px;
	margin-bottom: 0px;
	background-color: #cdcdcd;
}
-->
</style>
<div align="center"><strong><font size=2>GameMasters Do Servidor</strong></div>
<p>
<?
include("db.php");
$query=mssql_query("SELECT * FROM Character WHERE CtlCode=8");
while($gm=mssql_fetch_array($query)){
$stat="";
$gmname=$gm['Name'];
$gmacc=$gm['AccountID'];
$query2=mssql_query("SELECT ConnectStat FROM MEMB_STAT WHERE memb___id='$gmacc'");
$query3=mssql_query("SELECT GameIDC FROM AccountCharacter WHERE Id='$gmacc'");
$query3=mssql_result($query3, 0, 0);
$rquery2=mssql_num_rows($query2);
if($rquery2<1) { $query2 = '0'; }
else{ $query2=mssql_result($query2, 0, 0); }
if($query2=='1'){ 
if($query3==$gmname){ 
$stat =  '<font color=green><strong>[ON]</strong></font>';
 } 
}
if($query2=='0'){
  $stat =  '<font color=red><strong>[OFF]</strong></font>';
 }
if($query2=='1' AND $query3 <> $gmname){ 
 $stat =  '<font color=red><strong>[OFF]</strong></font>';
 }
	  echo "$gmname $stat";
	  echo "<br>";
}
?>

